package ooday02;

public class ExtendsTest {
    public static void main(String[] args) {
//学生类：
        //无参调用：
        Student st1 =new Student();
        st1.name = "光头强";
        st1.age = 10;
        st1.address = "陕西";
        st1.stuId ="001";
        st1.className = "jsd2403";
        st1.eat();
        st1.sleep();
        st1.sayHi();
        st1.study();
        System.out.println();


        //学生类：有参调用
        Student st = new Student("小明",30,"上海","jsd2404","001");
        st.eat();
        st.sleep();
        st.sayHi();
        st.study();
        System.out.println();

        //老师类，有参调用；
        Teacher te = new Teacher("张老师",44,"北京",2100);
        te.eat();
        te.sleep();
        te.sayHi();
        te.tech();
        System.out.println();
        //医生类：有参调用：
        Doctor doc = new Doctor("张医生",40,"郑州","外科");
        doc.eat();
        doc.sleep();
        doc.sayHi();
        doc.cut();

        System.out.println();
        //演示父类的调用：
        Person per = new Person();
        per.name ="ren";
        per.age = 50;
        per.address ="山西";
        per.eat();
        per.sleep();
        per.sayHi();










    }
}
